$(document).ready(function(e) {
	if(document.location.href.indexOf("activity.html")==-1){
		
	}
});
	var jsonserver;
	//jsonserver="http://192.168.6.61:8580/mobile-html5-rest/";
	//jsonserver="http://192.168.37.116:8089/mobile-html5-rest/";

	jsonserver="http://bj.911860.com/mobile-html5-rest/";

	//jsonserver="http://bi.911860.com/mobile-html5-rest/";

	
function getQueryParameter(qs)  
{  
	var s = location.href;  
	s = s.replace("?","?&").split("&");//这样可以保证第一个参数也能分出来 
	var re = "";  
	for(i=1;i<s.length;i++)  
		if(s[i].indexOf(qs+"=")==0)  
			re = s[i].replace(qs+"=","");//取代前面的参数名，只剩下参数值  
			  
	return re;  
}  

function detectDeviceType(){
	var isIphone =navigator.userAgent.indexOf("iPhone") != -1;
	var isIpod = navigator.userAgent.indexOf("iPod") != -1 ;
	var isIpad = navigator.userAgent.indexOf("iPad") != -1 ;
	
	var isAndroid = navigator.userAgent.indexOf("Android") != -1 ;
	var isIos = isIphone || isIpod || isIpad ;
	return isIos?"Apple":"Android";
	//return "Apple";
} 



function isEmpty(str)
{
	return (str==null||str==""||str==" ")?true:false;

}
function exitLoginPage()
{
	localStorage.removeItem("width");
	localStorage.removeItem("height");
	window.localStorage.removeItem("curphone");
	window.localStorage.removeItem("userkey");
	localStorage.removeItem("username");
	localStorage.removeItem("innetTime");
	localStorage.removeItem("payType");//0后付费
	localStorage.removeItem("credit");
	window.localStorage.removeItem("packname");
	window.localStorage.removeItem("datasDate");
	var url = document.URL;
	if(url != null && url.indexOf("bilogin.html")== -1 && url.indexOf("bespoke-app.html")== -1&& url.indexOf("activity.html")== -1&& url.indexOf("gamerule.html")== -1&& url.indexOf("actstate.html")== -1&& url.indexOf("flowend.html")== -1&& url.indexOf("/HD")== -1){
		document.location="http://bj.911860.com/www/bilogin.html";

	}
	if(url.indexOf("activity.html")!= -1){
		loginflag = false;
	}
}

